package cn.etynit.mms.feign;

import cn.etynit.domain.VisitorLog;
import cn.etynit.mms.fallback.VisitorLogServiceFallbackFactory;
import cn.etynit.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@FeignClient(contextId = "visitorLogService",value = "service-doorkeeper",path = "visitorLog",fallbackFactory = VisitorLogServiceFallbackFactory.class)
public interface VisitorLogService {
    @RequestMapping(value="/save",method= RequestMethod.POST)
    JsonResult saveOrUpdate(@RequestBody VisitorLog visitorLog);

    @RequestMapping(value = "/{visitorName}/{visitorPhone}",method = RequestMethod.GET)
    JsonResult getVisitor(@PathVariable("visitorName")String visitorName, @PathVariable("visitorPhone")String visitorPhone);
}
